﻿<phone:PhoneApplicationPage 
    x:Class="HangzhouTour.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.Resources>
            <DataTemplate x:Key="PanoramaTitle">
                <TextBlock Text="{Binding}" 
                           FontSize="60"  
                           Margin="20,90,10,10"/>
            </DataTemplate>
            <DataTemplate x:Key="PanoramaItemHeader">
                <TextBlock Text="{Binding}" 
                           FontSize="46"  
                           FontWeight="Bold"
                           Margin="20,30,10,-10"/>
            </DataTemplate>
            <DataTemplate x:Key="PanoramaItemContent">
                <ScrollViewer VerticalScrollBarVisibility="Auto">
                    <TextBlock Text="{Binding}"
                                TextWrapping="Wrap" 
                               FontSize="30" 
                               Margin="10,0,18,10" 
                               xml:space="preserve">
                    </TextBlock>
                </ScrollViewer>
            </DataTemplate>
        </Grid.Resources>
        <!--ContentPanel - place additional content here-->
        <controls:Panorama Title="{Binding Title}"  
                           x:Name="pano"
                           TitleTemplate="{StaticResource PanoramaTitle}"
                           Background="{Binding  Background}">
            
            <controls:PanoramaItem Header="简介" 
                                   ContentTemplate="{StaticResource PanoramaItemContent}"
                                   HeaderTemplate="{StaticResource PanoramaItemHeader}">
                <controls:PanoramaItem.Content>
                    <Binding Path="Introduction" />
                </controls:PanoramaItem.Content>
            </controls:PanoramaItem>
            <controls:PanoramaItem Header="交通" 
                                   ContentTemplate="{StaticResource PanoramaItemContent}"
                                   HeaderTemplate="{StaticResource PanoramaItemHeader}"
                                     >
                <controls:PanoramaItem.Content>
                    <Binding Path="Tracfic" />
                </controls:PanoramaItem.Content>
            </controls:PanoramaItem>
            <controls:PanoramaItem Header="其他" 
                                   ContentTemplate="{StaticResource PanoramaItemContent}"
                                   HeaderTemplate="{StaticResource PanoramaItemHeader}">
                <controls:PanoramaItem.Content>
                    <Binding Path="Others" />
                </controls:PanoramaItem.Content>
            </controls:PanoramaItem>
            <controls:PanoramaItem Header="图片" 
                                   
                                   HeaderTemplate="{StaticResource PanoramaItemHeader}">
                <controls:PanoramaItem.Content>
                    <Button Content="Click to view"  
                            Width="200" Height="100"
                            x:Name="btnViewImage"
                            Click="btnViewImage_Click"
                            HorizontalAlignment="Center" 
                            VerticalAlignment="Center"/>
                </controls:PanoramaItem.Content>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>